/*
 * $Id: RC4.h,v 1.1 2005-05-02 11:14:47 bacon Exp $
 */

#ifndef _XPP_BAS_RC4_CLASS_
#define _XPP_BAS_RC4_CLASS_

#include <xp/bas/stdlib.h>

namespace xpp
{
	namespace bas
	{

		class RC4: protected xp_rc4_t
		{
		public:
			enum {
				MAX_PASSWD_LEN  = XP_RC4_MAX_PASSWD
			};

			RC4 ();
			RC4 (const xp_byte_t* pw, xp_size_t psz);
			~RC4 ();
			
			void setPasswd (const xp_byte_t* pw, xp_size_t psz);
		
			void restart ();
			xp_byte_t cipher  (xp_byte_t c);
		};
		
	}
}

#endif
		
